#include "Time.h"
#include <string>
#include <ctime>
#ifdef ENG
using namespace std;

Time::Time(time_t now) {
	this->now = now;
}
string Time::greet() {
	tm* ltm = localtime(&now);
	int hour = ltm->tm_hour;
	string word;
	if (hour > 6 && hour <= 12) {
		word = "Good morning! ";
	}
	else if (hour > 12 && hour <= 19) {
		word = "Good afternoon! ";
	}
	else {
		word = "Good night! ";
	}
	return word;
}
#endif
